package com.example.demo.dto;

import com.example.demo.annotation.ColumnLengthValid;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author ghl
 * @version 1.0
 * @date 2022/9/21 10:17
 * @description 测试实体
 */
public class Person implements Serializable {

    @ColumnLengthValid(maxLength = 5, message = "名称超长")
    @NotBlank(message = "名称不能为空")
    private String name;

    @NotBlank(message = "地址不能为空")
    private String address;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
